﻿using Common.Data.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Warranty.Configuration;
using Warranty.Model.Model;

namespace Warranty.Data.DBConfig
{
    public class DealerConfiguration : DBConfig<Dealer>
    {
        public DealerConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.ShopCode, k.EdiNo, k.SelloutDate });
            //Property(c => c.CfmFlag).HasMaxLength(1);
            //Property(c => c.VrfFlag).HasMaxLength(1).IsRequired();
            Property(c => c.ShopCode).HasMaxLength(8).IsRequired();
            Property(c => c.EdiNo).HasMaxLength(30).IsRequired();
            //Property(c => c.SerialNo).HasMaxLength(50);
            //Property(c => c.BoxNo).HasMaxLength(100);
            //Property(c => c.Model).HasMaxLength(100);
            //Property(c => c.ModelDesc).HasMaxLength(200);
            //Property(c => c.EuCell).HasMaxLength(20);
            //Property(c => c.EuName).HasMaxLength(100);
        }
    }
}
